/**
 * AlarmRecievers.java $version 1.0 Nov 6, 2012
 *
 * Copyright 2011 Pravin Kumar Corp. All rights Reserved.
 * Pravin Kumar PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.mobile.rail.alarm.service.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;

/**
 * Provide a brief description of AlarmRecievers.
 * Specify the following items:
 *  - What does it do.
 *  - Its dependencies.
 *  - What section / item in the class document does it correspond to.
 *
 * @author 
 */
public class PhoneStateReciever extends BroadcastReceiver{
	
	
	public static String Tag = "PhoneStateReciever";

	/**
	 * Why are you overriding this method and what are you achieving here?
	 */
	@Override
	public void onReceive(Context context, Intent intent) {
		// TODO Auto-generated method stub
		MyPhoneStateListener phoneListener=new MyPhoneStateListener(context);
	    TelephonyManager telephony = (TelephonyManager) 
	    context.getSystemService(Context.TELEPHONY_SERVICE);
	    telephony.listen(phoneListener,PhoneStateListener.LISTEN_CELL_LOCATION);
		
	}

}
